package miiteen.customsportal.data.dao;

import javafx.beans.binding.ObjectExpression;
import org.springframework.stereotype.Repository;
import miiteen.data.dao.impl.BaseDaoImpl;
import miiteen.customsportal.data.beans.DataInfo;

import java.util.List;
import java.util.Map;

/**
 *Name: CustomsPortal_Data_Info
 *Des: -Dao
 *Author: yulp
 *Date: 2020-07-10
 */
@Repository("dataInfoDao")
public class DataInfoDao extends BaseDaoImpl<DataInfo>{

    @Override
	protected String getMapper() {
		return "miiteen.customsportal.data.beans.DataInfo";
	}

	public List<DataInfo> findAllDept(){
    	return getSqlSession().selectList(getMapper()+".findAllDept");
	}
	public DataInfo findListByMapPreviousNext(Map<String, Object> map){
    	return getSqlSession().selectOne(getMapper()+".findListByMapPreviousNext",map);
	}
	public  List<DataInfo> findAllCategory(Map<String, Object> map){
		return getSqlSession().selectList(getMapper()+".findAllCategory",map);
	}
	public  List<DataInfo> findByCategory(Map<String, Object> map){
		return getSqlSession().selectList(getMapper()+".findByCategory",map);
	}
	public  DataInfo findPreviousNextCategory(Map<String, Object> map){
		return getSqlSession().selectOne(getMapper()+".findPreviousNextCategory",map);
	}

}